package main

import (
	"fmt"
	"time"
)

func main() {
	ch := make(chan string)

	go func() {
		for i := 0; i <= 2; i++ {
			fmt.Println("i=", i)
		}
		time.Sleep(time.Second*1)
		ch <- "子go croutine结束"
	}()
	time.Sleep(time.Second*1)

	fmt.Println("z")
	str := <-ch
	fmt.Println("str=", str)
}
